<?php
class user_logout
{
	var $mess = '';

	function user_logout()
	{
		
		if(isset($_SESSION['valid_id']))
		{
			session_unset();
			session_destroy();
			setcookie("sessionID", "", time()-3600);
			setcookie("userID", "", time()-3600);
			
			global $lang;
			include_once("includes/addMessage.php");
			$this->mess = new addMessage($lang['LogoutText'],$lang['LogoutTextTitle']);
		}
	}


	function render()
	{		
		if($this->mess != '')
		{
			$this->mess->render();
		}
	}
}
?>